#include <stdio.h>
#include <stdlib.h>
#include <time.h>

time_t time_cnt;  	//秒计数器
struct tm time_date;


int main ()
{
	
	
	time_cnt =time(NULL);	//从系统中获取秒
	
	
	printf("Hello\n");
	
	//time_cnt = 1672588795;
	
	time_date = *localtime(&time_cnt);//local 函数 自动转化为 当地的秒计数器时间
	
	printf("%d\n",time_cnt);	
	
	printf("Hour=%d\n",time_date.tm_hour);
	printf("min=%d\n",time_date.tm_min);
	printf("sec=%d\n",time_date.tm_sec);	
	printf("year=%d\n",time_date.tm_year+1900);	
	printf("mon=%d\n",time_date.tm_mon+1);	
	printf("day=%d\n",time_date.tm_wday);	
	
	exit (0);
}




